@extends('home.layout.layout')
@section('title',"我的首页")

@section('con')

<div class="hp-wrap">
            <div id="container">
                <div id="container_padd">
                    <div id="indexline">
                        <div id="sidenav">
                            <ul>
                                <li>
                                    <a  href="{{url('/home/mypage/post/')}}" id='mypost' >
                                        我的发帖
                                    </a>
                                </li>
                                <li>
                                    <a  href="{{url('/home/mypage/follow/')}}" id='myfollow'>
                                        我的跟帖
                                    </a>
                                </li>
                        
                                <li>
                                    <a  href="{{url('/home/mypage/collect/')}}">
                                        我的收藏
                                    </a>
                                </li>
                              
                                
                            </ul>
                        </div>   
                        </div>
                        <div id="main" style='position:absolute;left: 242px;'>
                            <input name="token" type="hidden" id="token" value="596c875d2f2e5e40eb08f8fef9f647eb"
                            />
                            <div class="personal" itemscope itemtype="#">
                                <div class="personal_left">
                                    <img id="j_head" alt="byemichael" uid="17566152" flevel="" itemprop="image"
                                    src="{{asset($user->pic)}}" width="200px" />
                                    <br/>
                                    <input name="uid" type="hidden" id="uid" value="17566152" />
                                    <input name="winduid" type="hidden" id="winduid" value="" />
                                    <input name="windid" type="hidden" id="windid" value="" />
                                </div>
                                <div class="personal_right">
                                    <h3 class="mpersonal">
                                        <div class="left" itemprop="name">
                                            {{$user->username}}
                                        </div>
                                        <span class="f666">
                                           <button class="btn btn-primary btn-xs dao" type="button">签到</button>
                                        </span>

                                    </h3>
                                    <div class="personalinfo">
                                        
                                        <br />
                                        <span class="f666">
                                            所&nbsp;&nbsp;在&nbsp;&nbsp;地：
                                        </span>
                                        <span itemprop="address">
                                            {{$user->address}}
                                        </span>
                                        <br />
                                        <span class="f666">
                                            {{$user->username}}的球队：
                                        </span>
                                        <span itemprop="affiliation">
                                            
                                            {{$user->team}}
                                            
                                        </span>
                                        <br />
                                        <span class="f666">
                                            论坛等级：
                                        </span>
                                        <?php echo floor($user->userpoint/50); ?>
                                        <br/>
                                        <span class="f666">
                                            卡 &nbsp;路 &nbsp;里：
                                        </span>
                                        {{$user->userpoint}}
                                        <br />
                         
                                        <span class="f666">
                                            加入时间：
                                        </span>
                                        <?php echo date('Y年m月d日 H时i分s秒',$user->regtime); ?>
                                        <br/>
                                    </div>
                                </div>
                                <div class="clearfix">
                                    <div class="right blue">
                                        <a href="{{asset('/home/mypage/edit/')}}"><button class="btn btn-outline btn-primary" type="button">点击修改信息</button></a>
                                    </div> 
                                </div>
                                
                            </div>
                            <div class="person_set">
                                <div>
                                    <a class="s_add blue" onclick="show_login();" href="javascript:;">
                                        关注此人
                                    </a>
                                    <a class="s_mes blue" onClick="show_login();" href="javascript:;">
                                        发短消息
                                    </a>
                                </div>
                                
                            
                                <div class="clearfix">
                                </div>
                                <div class="brief m5px">
                                    {{$user->username}}的介绍：{{$user->introduction}}
                                </div>
                            </div>
                            <div class="clearfix">
                            </div>
                            <div id="event" class="indexdynamic ga">
                            </div>
                        </div>
                        <div id="sidebar">
                            <div id="medal" class="indexfriend mydynamic ga">
                            </div>
                            <div id="following" class="indexfriend mydynamic ga">
                                <h3>
                                    <a href="/byemichael/following">
                                        {{$user->username}}关注的人
                                    </a>
                                </h3>
                                <ul class="peoplelist">
                                    <li>
                                        <a class="headpic" rel="contact" href="#">
                                            <img alt="MCZzY" width="45" height="45" src="{{asset('/HomeCss/mypage/picture/20072616_small_6.jpg@60q')}}"
                                            />
                                        </a>
                                        <span>
                                            <a class="u" rel="contact" href="#">
                                                MCZzY
                                            </a>
                                        </span>
                                    </li>
                      
                                </ul>
                                <p class="more">
                                    <a href="/byemichael/following">
                                        关注9个人
                                    </a>
                                    &nbsp; - &nbsp;
                                    <a href="/byemichael/follower">
                                        1个粉丝&raquo;
                                    </a>
                                </p>
                            </div>
                            <div id="visitor" class="indexvisiter ga">
                                <h3>
                                    最近访客
                                </h3>
                                <ul class="peoplelist">
                                    <li>
                                        <a class="headpic" href="#">
                                            <img alt="hupu_047ad806931061cb" width="45" height="45" src="{{asset('/HomeCss/mypage/picture/default_small.jpg@60q')}}"
                                            />
                                        </a>
                                        <span>
                                            <a class="u" href="#">
                                                hupu_047ad806931061cb
                                            </a>
                                        </span>
                                    </li>
                                </ul>
                                <div class="clearfix">
                                </div>
                            </div>
                           
                           
                        </div>
                        <div class="clearfix">
                        </div>
                    </div>
                </div>
            </div>
</div>
@endsection
@section('js')
    <script type="text/javascript">

    //签到
    $('.dao').click(function(){
        $.get('/home/mypage/qiandao',{test:1},function(data){
                if(data==1){
                    alert('签到成功');
                    location.reload();
                    return true;
                }else if(data==2){
                    alert('您已签到');
                    return false;
                }
                else{
                    alert('您还未登录...');
                    return false;
                }
            })
    });

    </script>
@endsection